home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Python 1.1 / Misc / HISTORY < prev    next >
Encoding:
Text File  |  1994-10-06  |  74.8 KB  |  2,060 lines  |  [TEXT/R*ch]

  1. Python history
  2. --------------
  3.  
  4. This file contains the release messages for previous Python releases
  5. (slightly edited to adapt them to the format of this file).  As you
  6. read on you go back to the dark ages of Python's history.
  7.  
  8.  
  9. ====================================
  10. ==> Release 1.0.3 (14 July 1994) <==
  11. ====================================
  12.  
  13. This release consists entirely of bug fixes to the C sources; see the
  14. head of ../ChangeLog for a complete list.  Most important bugs fixed:
  15.  
  16. - Sometimes the format operator (string%expr) would drop the last
  17. character of the format string
  18.  
  19. - Tokenizer looped when last line did not end in \n
  20.  
  21. - Bug when triple-quoted string ended in quote plus newline
  22.  
  23. - Typo in socketmodule (listen) (== instead of =)
  24.  
  25. - typing vars() at the >>> prompt would cause recursive output
  26.  
  27.  
  28. ==================================
  29. ==> Release 1.0.2 (4 May 1994) <==
  30. ==================================
  31.  
  32. Overview of the most visible changes.  Bug fixes are not listed.  See
  33. also ChangeLog.
  34.  
  35. Tokens
  36. ------
  37.  
  38. * String literals follow Standard C rules: they may be continued on
  39. the next line using a backslash; adjacent literals are concatenated
  40. at compile time.
  41.  
  42. * A new kind of string literals, surrounded by triple quotes (""" or
  43. '''), can be continued on the next line without a backslash.
  44.  
  45. Syntax
  46. ------
  47.  
  48. * Function arguments may have a default value, e.g. def f(a, b=1);
  49. defaults are evaluated at function definition time.  This also applies
  50. to lambda.
  51.  
  52. * The try-except statement has an optional else clause, which is
  53. executed when no exception occurs in the try clause.
  54.  
  55. Interpreter
  56. -----------
  57.  
  58. * The result of a statement-level expression is no longer printed,
  59. except_ for expressions entered interactively.  Consequently, the -k
  60. command line option is gone.
  61.  
  62. * The result of the last printed interactive expression is assigned to
  63. the variable '_'.
  64.  
  65. * Access to implicit global variables has been speeded up by removing
  66. an always-failing dictionary lookup in the dictionary of local
  67. variables (mod suggested by Steve Makewski and Tim Peters).
  68.  
  69. * There is a new command line option, -u, to force stdout and stderr
  70. to be unbuffered.
  71.  
  72. * Incorporated Steve Majewski's mods to import.c for dynamic loading
  73. under AIX.
  74.  
  75. * Fewer chances of dumping core when trying to reload or re-import
  76. static built-in, dynamically loaded built-in, or frozen modules.
  77.  
  78. * Loops over sequences now don't ask for the sequence's length when
  79. they start, but try to access items 0, 1, 2, and so on until they hit
  80. an IndexError.  This makes it possible to create classes that generate
  81. infinite or indefinite sequences a la Steve Majewski.  This affects
  82. for loops, the (not) in operator, and the built-in functions filter(),
  83. map(), max(), min(), reduce().
  84.  
  85. Changed Built-in operations
  86. ---------------------------
  87.  
  88. * The '%' operator on strings (printf-style formatting) supports a new
  89. feature (adapted from a patch by Donald Beaudry) to allow
  90. '%(<key>)<format>' % {...} to take values from a dictionary by name
  91. instead of from a tuple by position (see also the new function
  92. vars()).
  93.  
  94. * The '%s' formatting operator is changed to accept any type and
  95. convert it to a string using str().
  96.  
  97. * Dictionaries with more than 20,000 entries can now be created
  98. (thanks to Steve Kirsch).
  99.  
  100. New Built-in Functions
  101. ----------------------
  102.  
  103. * vars() returns a dictionary containing the local variables; vars(m)
  104. returns a dictionary containing the variables of module m.  Note:
  105. dir(x) is now equivalent to vars(x).keys().
  106.  
  107. Changed Built-in Functions
  108. --------------------------
  109.  
  110. * open() has an optional third argument to specify the buffer size: 0
  111. for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0
  112. for default.
  113.  
  114. * open()'s second argument is now optional; it defaults to "r".
  115.  
  116. * apply() now checks that its second argument is indeed a tuple.
  117.  
  118. New Built-in Modules
  119. --------------------
  120.  
  121. Changed Built-in Modules
  122. ------------------------
  123.  
  124. The thread module no longer supports exit_prog().
  125.  
  126. New Python Modules
  127. ------------------
  128.  
  129. * Module addpack contains a standard interface to modify sys.path to
  130. find optional packages (groups of related modules).
  131.  
  132. * Module urllib contains a number of functions to access
  133. World-Wide-Web files specified by their URL.
  134.  
  135. * Module httplib implements the client side of the HTTP protocol used
  136. by World-Wide-Web servers.
  137.  
  138. * Module gopherlib implements the client side of the Gopher protocol.
  139.  
  140. * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF
  141. style mailbox files.
  142.  
  143. * Module random contains various random distributions, e.g. gauss().
  144.  
  145. * Module lockfile locks and unlocks open files using fcntl (inspired
  146. by a similar module by Andy Bensky).
  147.  
  148. * Module ntpath (by Jaap Vermeulen) implements path operations for
  149. Windows/NT.
  150.  
  151. * Module test_thread (in Lib/test) contains a small test set for the
  152. thread module.
  153.  
  154. Changed Python Modules
  155. ----------------------
  156.  
  157. * The string module's expandvars() function is now documented and is
  158. implemented in Python (using regular expressions) instead of forking
  159. off a shell process.
  160.  
  161. * Module rfc822 now supports accessing the header fields using the
  162. mapping/dictionary interface, e.g. h['subject'].
  163.  
  164. * Module pdb now makes it possible to set a break on a function
  165. (syntax: break <expression>, where <expression> yields a function
  166. object).
  167.  
  168. Changed Demos
  169. -------------
  170.  
  171. * The Demo/scripts/freeze.py script is working again (thanks to Jaap
  172. Vermeulen).
  173.  
  174. New Demos
  175. ---------
  176.  
  177. * Demo/threads/Generator.py is a proposed interface for restartable
  178. functions a la Tim Peters.
  179.  
  180. * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a
  181. directory full of HTML pages which between them contain links to all
  182. the newsgroups available on your server.
  183.  
  184. * Demo/dns contains a DNS (Domain Name Server) client.
  185.  
  186. * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a
  187. nice enhanced Python shell!!!).
  188.  
  189. * Demo/turing contains a Turing machine by Amrit Prem.
  190.  
  191. Documentation
  192. -------------
  193.  
  194. * Documented new language features mentioned above (but not all new
  195. modules).
  196.  
  197. * Added a chapter to the Tutorial describing recent additions to
  198. Python.
  199.  
  200. * Clarified some sentences in the reference manual,
  201. e.g. break/continue, local/global scope, slice assignment.
  202.  
  203. Source Structure
  204. ----------------
  205.  
  206. * Moved Include/tokenizer.h to Parser/tokenizer.h.
  207.  
  208. * Added Python/getopt.c for systems that don't have it.
  209.  
  210. Emacs mode
  211. ----------
  212.  
  213. * Indentation of continuated lines is done more intelligently;
  214. consequently the variable py-continuation-offset is gone.
  215.  
  216. ========================================
  217. ==> Release 1.0.1 (15 February 1994) <==
  218. ========================================
  219.  
  220. * Many portability fixes should make it painless to build Python on
  221. several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows.
  222.  
  223. * Fixed test for <stdarg.h> -- this broke on some platforms.
  224.  
  225. * Fixed test for shared library dynalic loading -- this broke on SunOS
  226. 4.x using the GNU loader.
  227.  
  228. * Changed order and number of SVR4 networking libraries (it is now
  229. -lsocket -linet -lnsl, if these libraries exist).
  230.  
  231. * Installing the build intermediate stages with "make libainstall" now
  232. also installs config.c.in, Setup and makesetup, which are used by the
  233. new Extensions mechanism.
  234.  
  235. * Improved README file contains more hints and new troubleshooting
  236. section.
  237.  
  238. * The built-in module strop now defines fast versions of three more
  239. functions of the standard string module: atoi(), atol() and atof().
  240. The strop versions of atoi() and atol() support an optional second
  241. argument to specify the base (default 10).  NOTE: you don't have to
  242. explicitly import strop to use the faster versions -- the string
  243. module contains code to let versions from stop override the default
  244. versions.
  245.  
  246. * There is now a working Lib/dospath.py for those who use Python under
  247. DOS (or Windows).  Thanks, Jaap!
  248.  
  249. * There is now a working Modules/dosmodule.c for DOS (or Windows)
  250. system calls.
  251.  
  252. * Lib.os.py has been reorganized (making it ready for more operating
  253. systems).
  254.  
  255. * Lib/ospath.py is now obsolete (use os.path instead).
  256.  
  257. * Many fixes to the tutorial to make it match Python 1.0.  Thanks,
  258. Tim!
  259.  
  260. * Fixed Doc/Makefile, Doc/README and various scripts there.
  261.  
  262. * Added missing description of fdopen to Doc/libposix.tex.
  263.  
  264. * Made cleanup() global, for the benefit of embedded applications.
  265.  
  266. * Added parsing of addresses and dates to Lib/rfc822.py.
  267.  
  268. * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make
  269. them usable at all.
  270.  
  271. * New module Lib/wave.py reads RIFF (*.wav) audio files.
  272.  
  273. * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it
  274. belongs.
  275.  
  276. * New options and comments for Modules/makesetup (used by new
  277. Extension mechanism).
  278.  
  279. * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc
  280. and elsewhere.
  281.  
  282. * Fixed coredump in filter(None, 'abcdefg').
  283.  
  284.  
  285. =======================================
  286. ==> Release 1.0.0 (26 January 1994) <==
  287. =======================================
  288.  
  289. As is traditional, so many things have changed that I can't pretend to
  290. be complete in these release notes, but I'll try anyway :-)
  291.  
  292. Note that the very last section is labeled "remaining bugs".
  293.  
  294.  
  295. Source organization and build process
  296. -------------------------------------
  297.  
  298. * The sources have finally been split: instead of a single src
  299. subdirectory there are now separate directories Include, Parser,
  300. Grammar, Objects, Python and Modules.  Other directories also start
  301. with a capital letter: Misc, Doc, Lib, Demo.
  302.  
  303. * A few extensions (notably Amoeba and X support) have been moved to a
  304. separate subtree Extensions, which is no longer in the core
  305. distribution, but separately ftp'able as extensions.tar.Z.  (The
  306. distribution contains a placeholder Ext-dummy with a description of
  307. the Extensions subtree as well as the most recent versions of the
  308. scripts used there.)
  309.  
  310. * A few large specialized demos (SGI video and www) have been
  311. moved to a separate subdirectory Demo2, which is no longer in the core
  312. distribution, but separately ftp'able as demo2.tar.Z.
  313.  
  314. * Parts of the standard library have been moved to subdirectories:
  315. there are now standard subdirectories stdwin, test, sgi and sun4.
  316.  
  317. * The configuration process has radically changed: I now use GNU
  318. autoconf.  This makes it much easier to build on new Unix flavors, as
  319. well as fully supporting VPATH (if your Make has it).  The scripts
  320. Configure.py and Addmodule.sh are no longer needed.  Many source files
  321. have been adapted in order to work with the symbols that the configure
  322. script generated by autoconf defines (or not); the resulting source is
  323. much more portable to different C compilers and operating systems,
  324. even non Unix systems (a Mac port was done in an afternoon).  See the
  325. toplevel README file for a description of the new build process.
  326.  
  327. * GNU readline (a slightly newer version) is now a subdirectory of the
  328. Python toplevel.  It is still not automatically configured (being
  329. totally autoconf-unaware :-).  One problem has been solved: typing
  330. Control-C to a readline prompt will now work.  The distribution no
  331. longer contains a "super-level" directory (above the python toplevel
  332. directory), and dl, dl-dld and GNU dld are no longer part of the
  333. Python distribution (you can still ftp them from
  334. ftp.cwi.nl:/pub/dynload).
  335.  
  336. * The DOS functions have been taken out of posixmodule.c and moved
  337. into a separate file dosmodule.c.
  338.  
  339. * There's now a separate file version.c which contains nothing but
  340. the version number.
  341.  
  342. * The actual main program is now contained in config.c (unless NO_MAIN
  343. is defined); pythonmain.c now contains a function realmain() which is
  344. called from config.c's main().
  345.  
  346. * All files needed to use the built-in module md5 are now contained in
  347. the distribution.  The module has been cleaned up considerably.
  348.  
  349.  
  350. Documentation
  351. -------------
  352.  
  353. * The library manual has been split into many more small latex files,
  354. so it is easier to edit Doc/lib.tex file to create a custom library
  355. manual, describing only those modules supported on your system.  (This
  356. is not automated though.)
  357.  
  358. * A fourth manual has been added, titled "Extending and Embedding the
  359. Python Interpreter" (Doc/ext.tex), which collects information about
  360. the interpreter which was previously spread over several files in the
  361. misc subdirectory.
  362.  
  363. * The entire documentation is now also available on-line for those who
  364. have a WWW browser (e.g. NCSA Mosaic).  Point your browser to the URL
  365. "http://www.cwi.nl/~guido/Python.html".
  366.  
  367.  
  368. Syntax
  369. ------
  370.  
  371. * Strings may now be enclosed in double quotes as well as in single
  372. quotes.  There is no difference in interpretation.  The repr() of
  373. string objects will use double quotes if the string contains a single
  374. quote and no double quotes.  Thanks to Amrit Prem for these changes!
  375.  
  376. * There is a new keyword 'exec'.  This replaces the exec() built-in
  377. function.  If a function contains an exec statement, local variable
  378. optimization is not performed for that particular function, thus
  379. making assignment to local variables in exec statements less
  380. confusing.  (As a consequence, os.exec and python.exec have been
  381. renamed to execv.)
  382.  
  383. * There is a new keyword 'lambda'.  An expression of the form
  384.  
  385.     lambda <parameters> : <expression>
  386.  
  387. yields an anonymous function.  This is really only syntactic sugar;
  388. you can just as well define a local function using
  389.  
  390.     def some_temporary_name(<parameters>): return <expression>
  391.  
  392. Lambda expressions are particularly useful in combination with map(),
  393. filter() and reduce(), described below.  Thanks to Amrit Prem for
  394. submitting this code (as well as map(), filter(), reduce() and
  395. xrange())!
  396.  
  397.  
  398. Built-in functions
  399. ------------------
  400.  
  401. * The built-in module containing the built-in functions is called
  402. __builtin__ instead of builtin.
  403.  
  404. * New built-in functions map(), filter() and reduce() perform standard
  405. functional programming operations (though not lazily):
  406.  
  407. - map(f, seq) returns a new sequence whose items are the items from
  408. seq with f() applied to them.
  409.  
  410. - filter(f, seq) returns a subsequence of seq consisting of those
  411. items for which f() is true.
  412.  
  413. - reduce(f, seq, initial) returns a value computed as follows:
  414.     acc = initial
  415.     for item in seq: acc = f(acc, item)
  416.     return acc
  417.  
  418. * New function xrange() creates a "range object".  Its arguments are
  419. the same as those of range(), and when used in a for loop a range
  420. objects also behaves identical.  The advantage of xrange() over
  421. range() is that its representation (if the range contains many
  422. elements) is much more compact than that of range().  The disadvantage
  423. is that the result cannot be used to initialize a list object or for
  424. the "Python idiom" [RED, GREEN, BLUE] = range(3).  On some modern
  425. architectures, benchmarks have shown that "for i in range(...): ..."
  426. actually executes *faster* than "for i in xrange(...): ...", but on
  427. memory starved machines like PCs running DOS range(100000) may be just
  428. too big to be represented at all...
  429.  
  430. * Built-in function exec() has been replaced by the exec statement --
  431. see above.
  432.  
  433.  
  434. The interpreter
  435. ---------------
  436.  
  437. * Syntax errors are now not printed to stderr by the parser, but
  438. rather the offending line and other relevant information are packed up
  439. in the SyntaxError exception argument.  When the main loop catches a
  440. SyntaxError exception it will print the error in the same format as
  441. previously, but at the proper position in the stack traceback.
  442.  
  443. * You can now set a maximum to the number of traceback entries
  444. printed by assigning to sys.tracebacklimit.  The default is 1000.
  445.  
  446. * The version number in .pyc files has changed yet again.
  447.  
  448. * It is now possible to have a .pyc file without a corresponding .py
  449. file.  (Warning: this may break existing installations if you have an
  450. old .pyc file lingering around somewhere on your module search path
  451. without a corresponding .py file, when there is a .py file for a
  452. module of the same name further down the path -- the new interpreter
  453. will find the first .pyc file and complain about it, while the old
  454. interpreter would ignore it and use the .py file further down.)
  455.  
  456. * The list sys.builtin_module_names is now sorted and also contains
  457. the names of a few hardwired built-in modules (sys, __main__ and
  458. __builtin__).
  459.  
  460. * A module can now find its own name by accessing the global variable
  461. __name__.  Assigning to this variable essentially renames the module
  462. (it should also be stored under a different key in sys.modules).
  463. A neat hack follows from this: a module that wants to execute a main
  464. program when called as a script no longer needs to compare
  465. sys.argv[0]; it can simply do "if __name__ == '__main__': main()".
  466.  
  467. * When an object is printed by the print statement, its implementation
  468. of str() is used.  This means that classes can define __str__(self) to
  469. direct how their instances are printed.  This is different from
  470. __repr__(self), which should define an unambigous string
  471. representation of the instance.  (If __str__() is not defined, it
  472. defaults to __repr__().)
  473.  
  474. * Functions and code objects can now be compared meaningfully.
  475.  
  476. * On systems supporting SunOS or SVR4 style shared libraries, dynamic
  477. loading of modules using shared libraries is automatically configured.
  478. Thanks to Bill Jansen and Denis Severson for contributing this change!
  479.  
  480.  
  481. Built-in objects
  482. ----------------
  483.  
  484. * File objects have acquired a new method writelines() which is the
  485. reverse of readlines().  (It does not actually write lines, just a
  486. list of strings, but the symmetry makes the choice of name OK.)
  487.  
  488.  
  489. Built-in modules
  490. ----------------
  491.  
  492. * Socket objects no longer support the avail() method.  Use the select
  493. module instead, or use this function to replace it:
  494.  
  495.     def avail(f):
  496.         import select
  497.         return f in select.select([f], [], [], 0)[0]
  498.  
  499. * Initialization of stdwin is done differently.  It actually modifies
  500. sys.argv (taking out the options the X version of stdwin recognizes)
  501. the first time it is imported.
  502.  
  503. * A new built-in module parser provides a rudimentary interface to the
  504. python parser.  Corresponding standard library modules token and symbol
  505. defines the numeric values of tokens and non-terminal symbols.
  506.  
  507. * The posix module has aquired new functions setuid(), setgid(),
  508. execve(), and exec() has been renamed to execv().
  509.  
  510. * The array module is extended with 8-byte object swaps, the 'i'
  511. format character, and a reverse() method.  The read() and write()
  512. methods are renamed to fromfile() and tofile().
  513.  
  514. * The rotor module has freed of portability bugs.  This introduces a
  515. backward compatibility problem: strings encoded with the old rotor
  516. module can't be decoded by the new version.
  517.  
  518. * For select.select(), a timeout (4th) argument of None means the same
  519. as leaving the timeout argument out.
  520.  
  521. * Module strop (and hence standard library module string) has aquired
  522. a new function: rindex().  Thanks to Amrit Prem!
  523.  
  524. * Module regex defines a new function symcomp() which uses an extended
  525. regular expression syntax: parenthesized subexpressions may be labeled
  526. using the form "\(<labelname>...\)", and the group() method can return
  527. sub-expressions by name.  Thanks to Tracy Tims for these changes!
  528.  
  529. * Multiple threads are now supported on Solaris 2.  Thanks to Sjoerd
  530. Mullender!
  531.  
  532.  
  533. Standard library modules
  534. ------------------------
  535.  
  536. * The library is now split in several subdirectories: all stuff using
  537. stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff
  538. is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all
  539. test modules are in Lib/test.  The default module search path will
  540. include all relevant subdirectories by default.
  541.  
  542. * Module os now knows about trying to import dos.  It defines
  543. functions execl(), execle(), execlp() and execvp().
  544.  
  545. * New module dospath (should be attacked by a DOS hacker though).
  546.  
  547. * All modules defining classes now define __init__() constructors
  548. instead of init() methods.  THIS IS AN INCOMPATIBLE CHANGE!
  549.  
  550. * Some minor changes and bugfixes module ftplib (mostly Steve
  551. Majewski's suggestions); the debug() method is renamed to
  552. set_debuglevel().
  553.  
  554. * Some new test modules (not run automatically by testall though):
  555. test_audioop, test_md5, test_rgbimg, test_select.
  556.  
  557. * Module string now defines rindex() and rfind() in analogy of index()
  558. and find().  It also defines atof() and atol() (and corresponding
  559. exceptions) in analogy to atoi().
  560.  
  561. * Added help() functions to modules profile and pdb.
  562.  
  563. * The wdb debugger (now in Lib/stdwin) now shows class or instance
  564. variables on a double click.  Thanks to Sjoerd Mullender!
  565.  
  566. * The (undocumented) module lambda has gone -- you couldn't import it
  567. any more, and it was basically more a demo than a library module...
  568.  
  569.  
  570. Multimedia extensions
  571. ---------------------
  572.  
  573. * The optional built-in modules audioop and imageop are now standard
  574. parts of the interpreter.  Thanks to Sjoerd Mullender and Jack Jansen
  575. for contributing this code!
  576.  
  577. * There's a new operation in audioop: minmax().
  578.  
  579. * There's a new built-in module called rgbimg which supports portable
  580. efficient reading of SGI RCG image files.  Thanks also to Paul
  581. Haeberli for the original code!  (Who will contribute a GIF reader?)
  582.  
  583. * The module aifc is gone -- you should now always use aifc, which has
  584. received a facelift.
  585.  
  586. * There's a new module sunau., for reading Sun (and NeXT) audio files.
  587.  
  588. * There's a new module audiodev which provides a uniform interface to
  589. (SGI Indigo and Sun Sparc) audio hardware.
  590.  
  591. * There's a new module sndhdr which recognizes various sound files by
  592. looking in their header and checking for various magic words.
  593.  
  594.  
  595. Optimizations
  596. -------------
  597.  
  598. * Most optimizations below can be configured by compile-time flags.
  599. Thanks to Sjoerd Mullender for submitting these optimizations!
  600.  
  601. * Small integers (default -1..99) are shared -- i.e. if two different
  602. functions compute the same value it is possible (but not
  603. guaranteed!!!) that they return the same *object*.  Python programs
  604. can detect this but should *never* rely on it.
  605.  
  606. * Empty tuples (which all compare equal) are shared in the same
  607. manner.
  608.  
  609. * Tuples of size up to 20 (default) are put in separate free lists
  610. when deallocated.
  611.  
  612. * There is a compile-time option to cache a string's hash function,
  613. but this appeared to have a negligeable effect, and as it costs 4
  614. bytes per string it is disabled by default.
  615.  
  616.  
  617. Embedding Python
  618. ----------------
  619.  
  620. * The initialization interface has been simplified somewhat.  You now
  621. only call "initall()" to initialize the interpreter.
  622.  
  623. * The previously announced renaming of externally visible identifiers
  624. has not been carried out.  It will happen in a later release.  Sorry.
  625.  
  626.  
  627. Miscellaneous bugs that have been fixed
  628. ---------------------------------------
  629.  
  630. * All known portability bugs.
  631.  
  632. * Version 0.9.9 dumped core in <listobject>.sort() which has been
  633. fixed.  Thanks to Jaap Vermeulen for fixing this and posting the fix
  634. on the mailing list while I was away!
  635.  
  636. * Core dump on a format string ending in '%', e.g. in the expression
  637. '%' % None.
  638.  
  639. * The array module yielded a bogus result for concatenation (a+b would
  640. yield a+a).
  641.  
  642. * Some serious memory leaks in strop.split() and strop.splitfields().
  643.  
  644. * Several problems with the nis module.
  645.  
  646. * Subtle problem when copying a class method from another class
  647. through assignment (the method could not be called).
  648.  
  649.  
  650. Remaining bugs
  651. --------------
  652.  
  653. * One problem with 64-bit machines remains -- since .pyc files are
  654. portable and use only 4 bytes to represent an integer object, 64-bit
  655. integer literals are silently truncated when written into a .pyc file.
  656. Work-around: use eval('123456789101112').
  657.  
  658. * The freeze script doesn't work any more.  A new and more portable
  659. one can probably be cooked up using tricks from Extensions/mkext.py.
  660.  
  661. * The dos support hasn't been tested yet.  (Really Soon Now we should
  662. have a PC with a working C compiler!)
  663.  
  664.  
  665. ===================================
  666. ==> Release 0.9.9 (29 Jul 1993) <==
  667. ===================================
  668.  
  669. I *believe* these are the main user-visible changes in this release,
  670. but there may be others.  SGI users may scan the {src,lib}/ChangeLog
  671. files for improvements of some SGI specific modules, e.g. aifc and
  672. cl.  Developers of extension modules should also read src/ChangeLog.
  673.  
  674.  
  675. Naming of C symbols used by the Python interpreter
  676. --------------------------------------------------
  677.  
  678. * This is the last release using the current naming conventions.  New
  679. naming conventions are explained in the file misc/NAMING.
  680. Summarizing, all externally visible symbols get (at least) a "Py"
  681. prefix, and most functions are renamed to the standard form
  682. PyModule_FunctionName.
  683.  
  684. * Writers of extensions are urged to start using the new naming
  685. conventions.  The next release will use the new naming conventions
  686. throughout (it will also have a different source directory
  687. structure).
  688.  
  689. * As a result of the preliminary work for the great renaming, many
  690. functions that were accidentally global have been made static.
  691.  
  692.  
  693. BETA X11 support
  694. ----------------
  695.  
  696. * There are now modules interfacing to the X11 Toolkit Intrinsics, the
  697. Athena widgets, and the Motif 1.1 widget set.  These are not yet
  698. documented except through the examples and README file in the demo/x11
  699. directory.  It is expected that this interface will be replaced by a
  700. more powerful and correct one in the future, which may or may not be
  701. backward compatible.  In other words, this part of the code is at most
  702. BETA level software!  (Note: the rest of Python is rock solid as ever!)
  703.  
  704. * I understand that the above may be a bit of a disappointment,
  705. however my current schedule does not allow me to change this situation
  706. before putting the release out of the door.  By releasing it
  707. undocumented and buggy, at least some of the (working!) demo programs,
  708. like itr (my Internet Talk Radio browser) become available to a larger
  709. audience.
  710.  
  711. * There are also modules interfacing to SGI's "Glx" widget (a GL
  712. window wrapped in a widget) and to NCSA's "HTML" widget (which can
  713. format HyperText Markup Language, the document format used by the
  714. World Wide Web).
  715.  
  716. * I've experienced some problems when building the X11 support.  In
  717. particular, the Xm and Xaw widget sets don't go together, and it
  718. appears that using X11R5 is better than using X11R4.  Also the threads
  719. module and its link time options may spoil things.  My own strategy is
  720. to build two Python binaries: one for use with X11 and one without
  721. it, which can contain a richer set of built-in modules.  Don't even
  722. *think* of loading the X11 modules dynamically...
  723.  
  724.  
  725. Environmental changes
  726. ---------------------
  727.  
  728. * Compiled files (*.pyc files) created by this Python version are
  729. incompatible with those created by the previous version.  Both
  730. versions detect this and silently create a correct version, but it
  731. means that it is not a good idea to use the same library directory for
  732. an old and a new interpreter, since they will start to "fight" over
  733. the *.pyc files...
  734.  
  735. * When a stack trace is printed, the exception is printed last instead
  736. of first.  This means that if the beginning of the stack trace
  737. scrolled out of your window you can still see what exception caused
  738. it.
  739.  
  740. * Sometimes interrupting a Python operation does not work because it
  741. hangs in a blocking system call.  You can now kill the interpreter by
  742. interrupting it three times.  The second time you interrupt it, a
  743. message will be printed telling you that the third interrupt will kill
  744. the interpreter.  The "sys.exitfunc" feature still makes limited
  745. clean-up possible in this case.
  746.  
  747.  
  748. Changes to the command line interface
  749. -------------------------------------
  750.  
  751. * The python usage message is now much more informative.
  752.  
  753. * New option -i enters interactive mode after executing a script --
  754. useful for debugging.
  755.  
  756. * New option -k raises an exception when an expression statement
  757. yields a value other than None.
  758.  
  759. * For each option there is now also a corresponding environment
  760. variable.
  761.  
  762.  
  763. Using Python as an embedded language
  764. ------------------------------------
  765.  
  766. * The distribution now contains (some) documentation on the use of
  767. Python as an "embedded language" in other applications, as well as a
  768. simple example.  See the file misc/EMBEDDING and the directory embed/.
  769.  
  770.  
  771. Speed improvements
  772. ------------------
  773.  
  774. * Function local variables are now generally stored in an array and
  775. accessed using an integer indexing operation, instead of through a
  776. dictionary lookup.  (This compensates the somewhat slower dictionary
  777. lookup caused by the generalization of the dictionary module.)
  778.  
  779.  
  780. Changes to the syntax
  781. ---------------------
  782.  
  783. * Continuation lines can now *sometimes* be written without a
  784. backslash: if the continuation is contained within nesting (), [] or
  785. {} brackets the \ may be omitted.  There's a much improved
  786. python-mode.el in the misc directory which knows about this as well.
  787.  
  788. * You can no longer use an empty set of parentheses to define a class
  789. without base classes.  That is, you no longer write this:
  790.  
  791.     class Foo(): # syntax error
  792.         ...
  793.  
  794. You must write this instead:
  795.  
  796.     class Foo:
  797.         ...
  798.  
  799. This was already the preferred syntax in release 0.9.8 but many
  800. people seemed not to have picked it up.  There's a Python script that
  801. fixes old code: demo/scripts/classfix.py.
  802.  
  803. * There's a new reserved word: "access".  The syntax and semantics are
  804. still subject of of research and debate (as well as undocumented), but
  805. the parser knows about the keyword so you must not use it as a
  806. variable, function, or attribute name.
  807.  
  808.  
  809. Changes to the semantics of the language proper
  810. -----------------------------------------------
  811.  
  812. * The following compatibility hack is removed: if a function was
  813. defined with two or more arguments, and called with a single argument
  814. that was a tuple with just as many arguments, the items of this tuple
  815. would be used as the arguments.  This is no longer supported.
  816.  
  817.  
  818. Changes to the semantics of classes and instances
  819. -------------------------------------------------
  820.  
  821. * Class variables are now also accessible as instance variables for
  822. reading (assignment creates an instance variable which overrides the
  823. class variable of the same name though).
  824.  
  825. * If a class attribute is a user-defined function, a new kind of
  826. object is returned: an "unbound method".  This contains a pointer to
  827. the class and can only be called with a first argument which is a
  828. member of that class (or a derived class).
  829.  
  830. * If a class defines a method __init__(self, arg1, ...) then this
  831. method is called when a class instance is created by the classname()
  832. construct.  Arguments passed to classname() are passed to the
  833. __init__() method.  The __init__() methods of base classes are not
  834. automatically called; the derived __init__() method must call these if
  835. necessary (this was done so the derived __init__() method can choose
  836. the call order and arguments for the base __init__() methods).
  837.  
  838. * If a class defines a method __del__(self) then this method is called
  839. when an instance of the class is about to be destroyed.  This makes it
  840. possible to implement clean-up of external resources attached to the
  841. instance.  As with __init__(), the __del__() methods of base classes
  842. are not automatically called.  If __del__ manages to store a reference
  843. to the object somewhere, its destruction is postponed; when the object
  844. is again about to be destroyed its __del__() method will be called
  845. again.
  846.  
  847. * Classes may define a method __hash__(self) to allow their instances
  848. to be used as dictionary keys.  This must return a 32-bit integer.
  849.  
  850.  
  851. Minor improvements
  852. ------------------
  853.  
  854. * Function and class objects now know their name (the name given in
  855. the 'def' or 'class' statement that created them).
  856.  
  857. * Class instances now know their class name.
  858.  
  859.  
  860. Additions to built-in operations
  861. --------------------------------
  862.  
  863. * The % operator with a string left argument implements formatting
  864. similar to sprintf() in C.  The right argument is either a single
  865. value or a tuple of values.  All features of Standard C sprintf() are
  866. supported except %p.
  867.  
  868. * Dictionaries now support almost any key type, instead of just
  869. strings.  (The key type must be an immutable type or must be a class
  870. instance where the class defines a method __hash__(), in order to
  871. avoid losing track of keys whose value may change.)
  872.  
  873. * Built-in methods are now compared properly: when comparing x.meth1
  874. and y.meth2, if x is equal to y and the methods are defined by the
  875. same function, x.meth1 compares equal to y.meth2.
  876.  
  877.  
  878. Additions to built-in functions
  879. -------------------------------
  880.  
  881. * str(x) returns a string version of its argument.  If the argument is
  882. a string it is returned unchanged, otherwise it returns `x`.
  883.  
  884. * repr(x) returns the same as `x`.  (Some users found it easier to
  885. have this as a function.)
  886.  
  887. * round(x) returns the floating point number x rounded to an whole
  888. number, represented as a floating point number.  round(x, n) returns x
  889. rounded to n digits.
  890.  
  891. * hasattr(x, name) returns true when x has an attribute with the given
  892. name.
  893.  
  894. * hash(x) returns a hash code (32-bit integer) of an arbitrary
  895. immutable object's value.
  896.  
  897. * id(x) returns a unique identifier (32-bit integer) of an arbitrary
  898. object.
  899.  
  900. * compile() compiles a string to a Python code object.
  901.  
  902. * exec() and eval() now support execution of code objects.
  903.  
  904.  
  905. Changes to the documented part of the library (standard modules)
  906. ----------------------------------------------------------------
  907.  
  908. * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so
  909. the border case '/foo/..' returns '/' instead of ''.
  910.  
  911. * A new function string.find() is added with similar semantics to
  912. string.index(); however when it does not find the given substring it
  913. returns -1 instead of raising string.index_error.
  914.  
  915.  
  916. Changes to built-in modules
  917. ---------------------------
  918.  
  919. * New optional module 'array' implements operations on sequences of
  920. integers or floating point numbers of a particular size.  This is
  921. useful to manipulate large numerical arrays or to read and write
  922. binary files consisting of numerical data.
  923.  
  924. * Regular expression objects created by module regex now support a new
  925. method named group(), which returns one or more \(...\) groups by number.
  926. The number of groups is increased from 10 to 100.
  927.  
  928. * Function compile() in module regex now supports an optional mapping
  929. argument; a variable casefold is added to the module which can be used
  930. as a standard uppercase to lowercase mapping.
  931.  
  932. * Module time now supports many routines that are defined in the
  933. Standard C time interface (<time.h>): gmtime(), localtime(),
  934. asctime(), ctime(), mktime(), as well as these variables (taken from
  935. System V): timezone, altzone, daylight and tzname.  (The corresponding
  936. functions in the undocumented module calendar have been removed; the
  937. undocumented and unfinished module tzparse is now obsolete and will
  938. disappear in a future release.)
  939.  
  940. * Module strop (the fast built-in version of standard module string)
  941. now uses C's definition of whitespace instead of fixing it to space,
  942. tab and newline; in practice this usually means that vertical tab,
  943. form feed and return are now also considered whitespace.  It exports
  944. the string of characters that are considered whitespace as well as the
  945. characters that are considered lowercase or uppercase.
  946.  
  947. * Module sys now defines the variable builtin_module_names, a list of
  948. names of modules built into the current interpreter (including not
  949. yet imported, but excluding two special modules that always have to be
  950. defined -- sys and builtin).
  951.  
  952. * Objects created by module sunaudiodev now also support flush() and
  953. close() methods.
  954.  
  955. * Socket objects created by module socket now support an optional
  956. flags argument for their methods sendto() and recvfrom().
  957.  
  958. * Module marshal now supports dumping to and loading from strings,
  959. through the functions dumps() and loads().
  960.  
  961. * Module stdwin now supports some new functionality.  You may have to
  962. ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.)
  963.  
  964.  
  965. Bugs fixed
  966. ----------
  967.  
  968. * Fixed comparison of negative long integers.
  969.  
  970. * The tokenizer no longer botches input lines longer than BUFSIZ.
  971.  
  972. * Fixed several severe memory leaks in module select.
  973.  
  974. * Fixed memory leaks in modules socket and sv.
  975.  
  976. * Fixed memory leak in divmod() for long integers.
  977.  
  978. * Problems with definition of floatsleep() on Suns fixed.
  979.  
  980. * Many portability bugs fixed (and undoubtedly new ones added :-).
  981.  
  982.  
  983. Changes to the build procedure
  984. ------------------------------
  985.  
  986. * The Makefile supports some new targets: "make default" and "make
  987. all".  Both are by normally equivalent to "make python".
  988.  
  989. * The Makefile no longer uses $> since it's not supported by all
  990. versions of Make.
  991.  
  992. * The header files now all contain #ifdef constructs designed to make
  993. it safe to include the same header file twice, as well as support for
  994. inclusion from C++ programs (automatic extern "C" { ... } added).
  995.  
  996.  
  997. Freezing Python scripts
  998. -----------------------
  999.  
  1000. * There is now some support for "freezing" a Python script as a
  1001. stand-alone executable binary file.  See the script
  1002. demo/scripts/freeze.py.  It will require some site-specific tailoring
  1003. of the script to get this working, but is quite worthwhile if you write
  1004. Python code for other who may not have built and installed Python.
  1005.  
  1006.  
  1007. MS-DOS
  1008. ------
  1009.  
  1010. * A new MS-DOS port has been done, using MSC 6.0 (I believe).  Thanks,
  1011. Marcel van der Peijl!  This requires fewer compatibility hacks in
  1012. posixmodule.c.  The executable is not yet available but will be soon
  1013. (check the mailing list).
  1014.  
  1015. * The default PYTHONPATH has changed.
  1016.  
  1017.  
  1018. Changes for developers of extension modules
  1019. -------------------------------------------
  1020.  
  1021. * Read src/ChangeLog for full details.
  1022.  
  1023.  
  1024. SGI specific changes
  1025. --------------------
  1026.  
  1027. * Read src/ChangeLog for full details.
  1028.  
  1029.  
  1030. ==================================
  1031. ==> Release 0.9.8 (9 Jan 1993) <==
  1032. ==================================
  1033.  
  1034. I claim no completeness here, but I've tried my best to scan the log
  1035. files throughout my source tree for interesting bits of news.  A more
  1036. complete account of the changes is to be found in the various
  1037. ChangeLog files. See also "News for release 0.9.7beta" below if you're
  1038. still using release 0.9.6, and the file HISTORY if you have an even
  1039. older release.
  1040.  
  1041.     --Guido
  1042.  
  1043.  
  1044. Changes to the language proper
  1045. ------------------------------
  1046.  
  1047. There's only one big change: the conformance checking for function
  1048. argument lists (of user-defined functions only) is stricter.  Earlier,
  1049. you could get away with the following:
  1050.  
  1051.     (a) define a function of one argument and call it with any
  1052.         number of arguments; if the actual argument count wasn't
  1053.         one, the function would receive a tuple containing the
  1054.         arguments arguments (an empty tuple if there were none).
  1055.  
  1056.     (b) define a function of two arguments, and call it with more
  1057.         than two arguments; if there were more than two arguments,
  1058.         the second argument would be passed as a tuple containing
  1059.         the second and further actual arguments.
  1060.  
  1061. (Note that an argument (formal or actual) that is a tuple is counted as
  1062. one; these rules don't apply inside such tuples, only at the top level
  1063. of the argument list.)
  1064.  
  1065. Case (a) was needed to accommodate variable-length argument lists;
  1066. there is now an explicit "varargs" feature (precede the last argument
  1067. with a '*').  Case (b) was needed for compatibility with old class
  1068. definitions: up to release 0.9.4 a method with more than one argument
  1069. had to be declared as "def meth(self, (arg1, arg2, ...)): ...".
  1070. Version 0.9.6 provide better ways to handle both casees, bot provided
  1071. backward compatibility; version 0.9.8 retracts the compatibility hacks
  1072. since they also cause confusing behavior if a function is called with
  1073. the wrong number of arguments.
  1074.  
  1075. There's a script that helps converting classes that still rely on (b),
  1076. provided their methods' first argument is called "self":
  1077. demo/scripts/methfix.py.
  1078.  
  1079. If this change breaks lots of code you have developed locally, try
  1080. #defining COMPAT_HACKS in ceval.c.
  1081.  
  1082. (There's a third compatibility hack, which is the reverse of (a): if a
  1083. function is defined with two or more arguments, and called with a
  1084. single argument that is a tuple with just as many arguments, the items
  1085. of this tuple will be used as the arguments.  Although this can (and
  1086. should!) be done using the built-in function apply() instead, it isn't
  1087. withdrawn yet.)
  1088.  
  1089.  
  1090. One minor change: comparing instance methods works like expected, so
  1091. that if x is an instance of a user-defined class and has a method m,
  1092. then (x.m==x.m) yields 1.
  1093.  
  1094.  
  1095. The following was already present in 0.9.7beta, but not explicitly
  1096. mentioned in the NEWS file: user-defined classes can now define types
  1097. that behave in almost allrespects like numbers.  See
  1098. demo/classes/Rat.py for a simple example.
  1099.  
  1100.  
  1101. Changes to the build process
  1102. ----------------------------
  1103.  
  1104. The Configure.py script and the Makefile has been made somewhat more
  1105. bullet-proof, after reports of (minor) trouble on certain platforms.
  1106.  
  1107. There is now a script to patch Makefile and config.c to add a new
  1108. optional built-in module: Addmodule.sh.  Read the script before using!
  1109.  
  1110. Useing Addmodule.sh, all optional modules can now be configured at
  1111. compile time using Configure.py, so there are no modules left that
  1112. require dynamic loading.
  1113.  
  1114. The Makefile has been fixed to make it easier to use with the VPATH
  1115. feature of some Make versions (e.g. SunOS).
  1116.  
  1117.  
  1118. Changes affecting portability
  1119. -----------------------------
  1120.  
  1121. Several minor portability problems have been solved, e.g. "malloc.h"
  1122. has been renamed to "mymalloc.h", "strdup.c" is no longer used, and
  1123. the system now tolerates malloc(0) returning 0.
  1124.  
  1125. For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now
  1126. distributed with Python.  This solves several minor problems, in
  1127. particular scripts invoked using #! can now use dynamic loading.
  1128.  
  1129.  
  1130. Changes to the interpreter interface
  1131. ------------------------------------
  1132.  
  1133. On popular demand, there's finally a "profile" feature for interactive
  1134. use of the interpreter.  If the environment variable $PYTHONSTARTUP is
  1135. set to the name of an existing file, Python statements in this file
  1136. are executed when the interpreter is started in interactive mode.
  1137.  
  1138. There is a new clean-up mechanism, complementing try...finally: if you
  1139. assign a function object to sys.exitfunc, it will be called when
  1140. Python exits or receives a SIGTERM or SIGHUP signal.
  1141.  
  1142. The interpreter is now generally assumed to live in
  1143. /usr/local/bin/python (as opposed to /usr/local/python).  The script
  1144. demo/scripts/fixps.py will update old scripts in place (you can easily
  1145. modify it to do other similar changes).
  1146.  
  1147. Most I/O that uses sys.stdin/stdout/stderr will now use any object
  1148. assigned to those names as long as the object supports readline() or
  1149. write() methods.
  1150.  
  1151. The parser stack has been increased to 500 to accommodate more
  1152. complicated expressions (7 levels used to be the practical maximum,
  1153. it's now about 38).
  1154.  
  1155. The limit on the size of the *run-time* stack has completely been
  1156. removed -- this means that tuple or list displays can contain any
  1157. number of elements (formerly more than 50 would crash the
  1158. interpreter). 
  1159.  
  1160.  
  1161. Changes to existing built-in functions and methods
  1162. --------------------------------------------------
  1163.  
  1164. The built-in functions int(), long(), float(), oct() and hex() now
  1165. also apply to class instalces that define corresponding methods
  1166. (__int__ etc.).
  1167.  
  1168.  
  1169. New built-in functions
  1170. ----------------------
  1171.  
  1172. The new functions str() and repr() convert any object to a string.
  1173. The function repr(x) is in all respects equivalent to `x` -- some
  1174. people prefer a function for this.  The function str(x) does the same
  1175. except if x is already a string -- then it returns x unchanged
  1176. (repr(x) adds quotes and escapes "funny" characters as octal escapes).
  1177.  
  1178. The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y.
  1179.  
  1180.  
  1181. Changes to general built-in modules
  1182. -----------------------------------
  1183.  
  1184. The time module's functions are more general: time() returns a
  1185. floating point number and sleep() accepts one.  Their accuracies
  1186. depends on the precision of the system clock.  Millisleep is no longer
  1187. needed (although it still exists for now), but millitimer is still
  1188. needed since on some systems wall clock time is only available with
  1189. seconds precision, while a source of more precise time exists that
  1190. isn't synchronized with the wall clock.  (On UNIX systems that support
  1191. the BSD gettimeofday() function, time.time() is as time.millitimer().)
  1192.  
  1193. The string representation of a file object now includes an address:
  1194. '<file 'filename', mode 'r' at #######>' where ###### is a hex number
  1195. (the object's address) to make it unique.
  1196.  
  1197. New functions added to posix: nice(), setpgrp(), and if your system
  1198. supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp().
  1199.  
  1200. Improvements to the socket module: socket objects have new methods
  1201. getpeername() and getsockname(), and the {get,set}sockopt methods can
  1202. now get/set any kind of option using strings built with the new struct
  1203. module.  And there's a new function fromfd() which creates a socket
  1204. object given a file descriptor (useful for servers started by inetd,
  1205. which have a socket connected to stdin and stdout).
  1206.  
  1207.  
  1208. Changes to SGI-specific built-in modules
  1209. ----------------------------------------
  1210.  
  1211. The FORMS library interface (fl) now requires FORMS 2.1a.  Some new
  1212. functions have been added and some bugs have been fixed.
  1213.  
  1214. Additions to al (audio library interface): added getname(),
  1215. getdefault() and getminmax().
  1216.  
  1217. The gl modules doesn't call "foreground()" when initialized (this
  1218. caused some problems) like it dit in 0.9.7beta (but not before).
  1219. There's a new gl function 'gversion() which returns a version string.
  1220.  
  1221. The interface to sv (Indigo video interface) has totally changed.
  1222. (Sorry, still no documentation, but see the examples in
  1223. demo/sgi/{sv,video}.)
  1224.  
  1225.  
  1226. Changes to standard library modules
  1227. -----------------------------------
  1228.  
  1229. Most functions in module string are now much faster: they're actually
  1230. implemented in C.  The module containing the C versions is called
  1231. "strop" but you should still import "string" since strop doesn't
  1232. provide all the interfaces defined in string (and strop may be renamed
  1233. to string when it is complete in a future release).
  1234.  
  1235. string.index() now accepts an optional third argument giving an index
  1236. where to start searching in the first argument, so you can find second
  1237. and further occurrences (this is similar to the regular expression
  1238. functions in regex).
  1239.  
  1240. The definition of what string.splitfields(anything, '') should return
  1241. is changed for the last time: it returns a singleton list containing
  1242. its whole first argument unchanged.  This is compatible with
  1243. regsub.split() which also ignores empty delimiter matches.
  1244.  
  1245. posixpath, macpath: added dirname() and normpath() (and basename() to
  1246. macpath).
  1247.  
  1248. The mainloop module (for use with stdwin) can now demultiplex input
  1249. from other sources, as long as they can be polled with select().
  1250.  
  1251.  
  1252. New built-in modules
  1253. --------------------
  1254.  
  1255. Module struct defines functions to pack/unpack values to/from strings
  1256. representing binary values in native byte order.
  1257.  
  1258. Module strop implements C versions of many functions from string (see
  1259. above).
  1260.  
  1261. Optional module fcntl defines interfaces to fcntl() and ioctl() --
  1262. UNIX only.  (Not yet properly documented -- see however src/fcntl.doc.)
  1263.  
  1264. Optional module mpz defines an interface to an altaernative long
  1265. integer implementation, the GNU MPZ library.
  1266.  
  1267. Optional module md5 uses the GNU MPZ library to calculate MD5
  1268. signatures of strings.
  1269.  
  1270. There are also optional new modules specific to SGI machines: imageop
  1271. defines some simple operations to images represented as strings; sv
  1272. interfaces to the Indigo video board; cl interfaces to the (yet
  1273. unreleased) compression library.
  1274.  
  1275.  
  1276. New standard library modules
  1277. ----------------------------
  1278.  
  1279. (Unfortunately the following modules are not all documented; read the
  1280. sources to find out more about them!)
  1281.  
  1282. autotest: run testall without showing any output unless it differs
  1283. from the expected output
  1284.  
  1285. bisect: use bisection to insert or find an item in a sorted list
  1286.  
  1287. colorsys: defines conversions between various color systems (e.g. RGB
  1288. <-> YUV)
  1289.  
  1290. nntplib: a client interface to NNTP servers
  1291.  
  1292. pipes: utility to construct pipeline from templates, e.g. for
  1293. conversion from one file format to another using several utilities.
  1294.  
  1295. regsub: contains three functions that are more or less compatible with
  1296. awk functions of the same name: sub() and gsub() do string
  1297. substitution, split() splits a string using a regular expression to
  1298. define how separators are define.
  1299.  
  1300. test_types: test operations on the built-in types of Python
  1301.  
  1302. toaiff: convert various audio file formats to AIFF format
  1303.  
  1304. tzparse: parse the TZ environment parameter (this may be less general
  1305. than it could be, let me know if you fix it).
  1306.  
  1307. (Note that the obsolete module "path" no longer exists.)
  1308.  
  1309.  
  1310. New SGI-specific library modules
  1311. --------------------------------
  1312.  
  1313. CL: constants for use with the built-in compression library interface (cl)
  1314.  
  1315. Queue: a multi-producer, multi-consumer queue class implemented for
  1316. use with the built-in thread module
  1317.  
  1318. SOCKET: constants for use with built-in module socket, e.g. to set/get
  1319. socket options.  This is SGI-specific because the constants to be
  1320. passed are system-dependent.  You can generate a version for your own
  1321. system by running the script demo/scripts/h2py.py with
  1322. /usr/include/sys/socket.h as input.
  1323.  
  1324. cddb: interface to the database used the the CD player
  1325.  
  1326. torgb: convert various image file types to rgb format (requires pbmplus)
  1327.  
  1328.  
  1329. New demos
  1330. ---------
  1331.  
  1332. There's an experimental interface to define Sun RPC clients and
  1333. servers in demo/rpc.
  1334.  
  1335. There's a collection of interfaces to WWW, WAIS and Gopher (both
  1336. Python classes and program providing a user interface) in demo/www.
  1337. This includes a program texi2html.py which converts texinfo files to
  1338. HTML files (the format used hy WWW).
  1339.  
  1340. The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse.
  1341.  
  1342. For SGI systems, there's a whole collection of programs and classes
  1343. that make use of the Indigo video board in demo/sgi/{sv,video}.  This
  1344. represents a significant amount of work that we're giving away!
  1345.  
  1346. There are demos "rsa" and "md5test" that exercise the mpz and md5
  1347. modules, respectively.  The rsa demo is a complete implementation of
  1348. the RSA public-key cryptosystem!
  1349.  
  1350. A bunch of games and examples submitted by Stoffel Erasmus have been
  1351. included in demo/stoffel.
  1352.  
  1353. There are miscellaneous new files in some existing demo
  1354. subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py,
  1355. sgi/al/cmpaf.py, sockets/{mcast,gopher}.py.
  1356.  
  1357. There are also many minor changes to existing files, but I'm too lazy
  1358. to run a diff and note the differences -- you can do this yourself if
  1359. you save the old distribution's demos.  One highlight: the
  1360. stdwin/python.py demo is much improved!
  1361.  
  1362.  
  1363. Changes to the documentation
  1364. ----------------------------
  1365.  
  1366. The LaTeX source for the library uses different macros to enable it to
  1367. be converted to texinfo, and from there to INFO or HTML format so it
  1368. can be browsed as a hypertext.  The net result is that you can now
  1369. read the Python library documentation in Emacs info mode!
  1370.  
  1371.  
  1372. Changes to the source code that affect C extension writers
  1373. ----------------------------------------------------------
  1374.  
  1375. The function strdup() no longer exists (it was used only in one places
  1376. and is somewhat of a a portability problem sice some systems have the
  1377. same function in their C library.
  1378.  
  1379. The functions NEW() and RENEW() allocate one spare byte to guard
  1380. against a NULL return from malloc(0) being taken for an error, but
  1381. this should not be relied upon.
  1382.  
  1383.  
  1384. =========================
  1385. ==> Release 0.9.7beta <==
  1386. =========================
  1387.  
  1388.  
  1389. Changes to the language proper
  1390. ------------------------------
  1391.  
  1392. User-defined classes can now implement operations invoked through
  1393. special syntax, such as x[i] or `x` by defining methods named
  1394. __getitem__(self, i) or __repr__(self), etc.
  1395.  
  1396.  
  1397. Changes to the build process
  1398. ----------------------------
  1399.  
  1400. Instead of extensive manual editing of the Makefile to select
  1401. compile-time options, you can now run a Configure.py script.
  1402. The Makefile as distributed builds a minimal interpreter sufficient to
  1403. run Configure.py.  See also misc/BUILD
  1404.  
  1405. The Makefile now includes more "utility" targets, e.g. install and
  1406. tags/TAGS
  1407.  
  1408. Using the provided strtod.c and strtol.c are now separate options, as
  1409. on the Sun the provided strtod.c dumps core :-(
  1410.  
  1411. The regex module is now an option chosen by the Makefile, since some
  1412. (old) C compilers choke on regexpr.c
  1413.  
  1414.  
  1415. Changes affecting portability
  1416. -----------------------------
  1417.  
  1418. You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin
  1419. interface
  1420.  
  1421. Dynamic loading is now supported for Sun (and other non-COFF systems)
  1422. throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's
  1423. DL is out, 1.4)
  1424.  
  1425. The system-dependent code for the use of the select() system call is
  1426. moved to one file: myselect.h
  1427.  
  1428. Thanks to Jaap Vermeulen, the code should now port cleanly to the
  1429. SEQUENT
  1430.  
  1431.  
  1432. Changes to the interpreter interface
  1433. ------------------------------------
  1434.  
  1435. The interpretation of $PYTHONPATH in the environment is different: it
  1436. is inserted in front of the default path instead of overriding it
  1437.  
  1438.  
  1439. Changes to existing built-in functions and methods
  1440. --------------------------------------------------
  1441.  
  1442. List objects now support an optional argument to their sort() method,
  1443. which is a comparison function similar to qsort(3) in C
  1444.  
  1445. File objects now have a method fileno(), used by the new select module
  1446. (see below)
  1447.  
  1448.  
  1449. New built-in function
  1450. ---------------------
  1451.  
  1452. coerce(x, y): take two numbers and return a tuple containing them
  1453. both converted to a common type
  1454.  
  1455.  
  1456. Changes to built-in modules
  1457. ---------------------------
  1458.  
  1459. sys: fixed core dumps in settrace() and setprofile()
  1460.  
  1461. socket: added socket methods setsockopt() and getsockopt(); and
  1462. fileno(), used by the new select module (see below)
  1463.  
  1464. stdwin: added fileno() == connectionnumber(), in support of new module
  1465. select (see below)
  1466.  
  1467. posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function.
  1468.  
  1469. gl: added qgetfd()
  1470.  
  1471. fl: added several new functions, fixed several obscure bugs, adapted
  1472. to FORMS 2.1
  1473.  
  1474.  
  1475. Changes to standard modules
  1476. ---------------------------
  1477.  
  1478. posixpath: changed implementation of ismount()
  1479.  
  1480. string: atoi() no longer mistakes leading zero for octal number
  1481.  
  1482. ...
  1483.  
  1484.  
  1485. New built-in modules
  1486. --------------------
  1487.  
  1488. Modules marked "dynamic only" are not configured at compile time but
  1489. can be loaded dynamically.  You need to turn on the DL or DLD option in
  1490. the Makefile for support dynamic loading of modules (this requires
  1491. external code).
  1492.  
  1493. select: interfaces to the BSD select() system call
  1494.  
  1495. dbm: interfaces to the (new) dbm library (dynamic only)
  1496.  
  1497. nis: interfaces to some NIS functions (aka yellow pages)
  1498.  
  1499. thread: limited form of multiple threads (sgi only)
  1500.  
  1501. audioop: operations useful for audio programs, e.g. u-LAW and ADPCM
  1502. coding (dynamic only)
  1503.  
  1504. cd: interface to Indigo SCSI CDROM player audio library (sgi only)
  1505.  
  1506. jpeg: read files in JPEG format (dynamic only, sgi only; needs
  1507. external code)
  1508.  
  1509. imgfile: read SGI image files (dynamic only, sgi only)
  1510.  
  1511. sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only)
  1512.  
  1513. sv: interface to Indigo video library (sgi only)
  1514.  
  1515. pc: a minimal set of MS-DOS interfaces (MS-DOS only)
  1516.  
  1517. rotor: encryption, by Lance Ellinghouse (dynamic only)
  1518.  
  1519.  
  1520. New standard modules
  1521. --------------------
  1522.  
  1523. Not all these modules are documented.  Read the source:
  1524. lib/<modulename>.py.  Sometimes a file lib/<modulename>.doc contains
  1525. additional documentation.
  1526.  
  1527. imghdr: recognizes image file headers
  1528.  
  1529. sndhdr: recognizes sound file headers
  1530.  
  1531. profile: print run-time statistics of Python code
  1532.  
  1533. readcd, cdplayer: companion modules for built-in module cd (sgi only)
  1534.  
  1535. emacs: interface to Emacs using py-connect.el (see below).
  1536.  
  1537. SOCKET: symbolic constant definitions for socket options
  1538.  
  1539. SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only)
  1540.  
  1541. SV: symbolic constat definitions for sv (sgi only)
  1542.  
  1543. CD: symbolic constat definitions for cd (sgi only)
  1544.  
  1545.  
  1546. New demos
  1547. ---------
  1548.  
  1549. scripts/pp.py: execute Python as a filter with a Perl-like command
  1550. line interface
  1551.  
  1552. classes/: examples using the new class features
  1553.  
  1554. threads/: examples using the new thread module
  1555.  
  1556. sgi/cd/: examples using the new cd module
  1557.  
  1558.  
  1559. Changes to the documentation
  1560. ----------------------------
  1561.  
  1562. The last-minute syntax changes of release 0.9.6 are now reflected
  1563. everywhere in the manuals
  1564.  
  1565. The reference manual has a new section (3.2) on implementing new kinds
  1566. of numbers, sequences or mappings with user classes
  1567.  
  1568. Classes are now treated extensively in the tutorial (chapter 9)
  1569.  
  1570. Slightly restructured the system-dependent chapters of the library
  1571. manual
  1572.  
  1573. The file misc/EXTENDING incorporates documentation for mkvalue() and
  1574. a new section on error handling
  1575.  
  1576. The files misc/CLASSES and misc/ERRORS are no longer necessary
  1577.  
  1578. The doc/Makefile now creates PostScript files automatically
  1579.  
  1580.  
  1581. Miscellaneous changes
  1582. ---------------------
  1583.  
  1584. Incorporated Tim Peters' changes to python-mode.el, it's now version
  1585. 1.06
  1586.  
  1587. A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python
  1588. program running in an Emacs buffer execute Emacs lisp code.  The
  1589. necessary Python code is in lib/emacs.py.  The Emacs code is
  1590. misc/py-connect.el (it needs some external Emacs lisp code)
  1591.  
  1592.  
  1593. Changes to the source code that affect C extension writers
  1594. ----------------------------------------------------------
  1595.  
  1596. New service function mkvalue() to construct a Python object from C
  1597. values according to a "format" string a la getargs()
  1598.  
  1599. Most functions from pythonmain.c moved to new pythonrun.c which is
  1600. in libpython.a.  This should make embedded versions of Python easier
  1601.  
  1602. ceval.h is split in eval.h (which needs compile.h and only declares
  1603. eval_code) and ceval.h (which doesn't need compile.hand declares the
  1604. rest)
  1605.  
  1606. ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to
  1607. improve the parallellism of multi-threaded programs by letting other
  1608. Python code run when a blocking system call or something similar is
  1609. made)
  1610.  
  1611. In structmember.[ch], new member types BYTE, CHAR and unsigned
  1612. variants have been added
  1613.  
  1614. New file xxmodule.c is a template for new extension modules.
  1615.  
  1616.  
  1617. ==================================
  1618. ==> RELEASE 0.9.6 (6 Apr 1992) <==
  1619. ==================================
  1620.  
  1621. Misc news in 0.9.6:
  1622. - Restructured the misc subdirectory
  1623. - Reference manual completed, library manual much extended (with indexes!)
  1624. - the GNU Readline library is now distributed standard with Python
  1625. - the script "../demo/scripts/classfix.py" fixes Python modules using old
  1626.   class syntax
  1627. - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!)
  1628. - Because of the GNU copyleft business I am not using the GNU regular
  1629.   expression implementation but a free re-implementation by Tatu Ylonen
  1630.   that recently appeared in comp.sources.misc (Bravo, Tatu!)
  1631.  
  1632. New features in 0.9.6:
  1633. - stricter try stmt syntax: cannot mix except and finally clauses on 1 try
  1634. - New module 'os' supplants modules 'mac' and 'posix' for most cases;
  1635.   module 'path' is replaced by 'os.path'
  1636. - os.path.split() return value differs from that of old path.split()
  1637. - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception
  1638.   currently being handled
  1639. - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled
  1640.   exception
  1641. - New function string.expandtabs() expands tabs in a string
  1642. - Added times() interface to posix (user & sys time of process & children)
  1643. - Added uname() interface to posix (returns OS type, hostname, etc.)
  1644. - New built-in function execfile() is like exec() but from a file
  1645. - Functions exec() and eval() are less picky about whitespace/newlines
  1646. - New built-in functions getattr() and setattr() access arbitrary attributes
  1647. - More generic argument handling in built-in functions (see "./EXTENDING")
  1648. - Dynamic loading of modules written in C or C++ (see "./DYNLOAD")
  1649. - Division and modulo for long and plain integers with negative operands
  1650.   have changed; a/b is now floor(float(a)/float(b)) and a%b is defined
  1651.   as a-(a/b)*b.  So now the outcome of divmod(a,b) is the same as
  1652.   (a/b, a%b) for integers.  For floats, % is also changed, but of course
  1653.   / is unchanged, and divmod(x,y) does not yield (x/y, x%y)...
  1654. - A function with explicit variable-length argument list can be declared
  1655.   like this: def f(*args): ...; or even like this: def f(a, b, *rest): ...
  1656. - Code tracing and profiling features have been added, and two source
  1657.   code debuggers are provided in the library (pdb.py, tty-oriented,
  1658.   and wdb, window-oriented); you can now step through Python programs!
  1659.   See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc"
  1660. - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is
  1661.   a script that fixes old Python modules
  1662. - Plain integer right shift now uses sign extension
  1663. - Long integer shift/mask operations now simulate 2's complement
  1664.   to give more useful results for negative operands
  1665. - Changed/added range checks for long/plain integer shifts
  1666. - Options found after "-c command" are now passed to the command in sys.argv
  1667.   (note subtle incompatiblity with "python -c command -- -options"!)
  1668. - Module stdwin is better protected against touching objects after they've
  1669.   been closed; menus can now also be closed explicitly
  1670. - Stdwin now uses its own exception (stdwin.error)
  1671.  
  1672. New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992):
  1673. - dictionary objects can now be compared properly; e.g., {}=={} is true
  1674. - new exception SystemExit causes termination if not caught;
  1675.   it is raised by sys.exit() so that 'finally' clauses can clean up,
  1676.   and it may even be caught.  It does work interactively!
  1677. - new module "regex" implements GNU Emacs style regular expressions;
  1678.   module "regexp" is rewritten in Python for backward compatibility
  1679. - formal parameter lists may contain trailing commas
  1680.  
  1681. Bugs fixed in 0.9.6:
  1682. - assigning to or deleting a list item with a negative index dumped core
  1683. - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L)
  1684.  
  1685. Bugs fixed in 0.9.5:
  1686. - masking operations involving negative long integers gave wrong results
  1687.  
  1688.  
  1689. ===================================
  1690. ==> RELEASE 0.9.4 (24 Dec 1991) <==
  1691. ===================================
  1692.  
  1693. - new function argument handling (see below)
  1694. - built-in apply(func, args) means func(args[0], args[1], ...)
  1695. - new, more refined exceptions
  1696. - new exception string values (NameError = 'NameError' etc.)
  1697. - better checking for math exceptions
  1698. - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i]
  1699. - fixed list assignment bug: "a[1:1] = a" now works correctly
  1700. - new class syntax, without extraneous parentheses
  1701. - new 'global' statement to assign global variables from within a function
  1702.  
  1703.  
  1704. New class syntax
  1705. ----------------
  1706.  
  1707. You can now declare a base class as follows:
  1708.  
  1709.     class B:            # Was: class B():
  1710.         def some_method(self): ...
  1711.         ...
  1712.  
  1713. and a derived class thusly:
  1714.  
  1715.     class D(B):            # Was: class D() = B():
  1716.         def another_method(self, arg): ...
  1717.  
  1718. Multiple inheritance looks like this:
  1719.  
  1720.     class M(B, D):            # Was: class M() = B(), D():
  1721.         def this_or_that_method(self, arg): ...
  1722.  
  1723. The old syntax is still accepted by Python 0.9.4, but will disappear
  1724. in Python 1.0 (to be posted to comp.sources).
  1725.  
  1726.  
  1727. New 'global' statement
  1728. ----------------------
  1729.  
  1730. Every now and then you have a global variable in a module that you
  1731. want to change from within a function in that module -- say, a count
  1732. of calls to a function, or an option flag, etc.  Until now this was
  1733. not directly possible.  While several kludges are known that
  1734. circumvent the problem, and often the need for a global variable can
  1735. be avoided by rewriting the module as a class, this does not always
  1736. lead to clearer code.
  1737.  
  1738. The 'global' statement solves this dilemma.  Its occurrence in a
  1739. function body means that, for the duration of that function, the
  1740. names listed there refer to global variables.  For instance:
  1741.  
  1742.     total = 0.0
  1743.     count = 0
  1744.  
  1745.     def add_to_total(amount):
  1746.         global total, count
  1747.         total = total + amount
  1748.         count = count + 1
  1749.  
  1750. 'global' must be repeated in each function where it is needed.  The
  1751. names listed in a 'global' statement must not be used in the function
  1752. before the statement is reached.
  1753.  
  1754. Remember that you don't need to use 'global' if you only want to *use*
  1755. a global variable in a function; nor do you need ot for assignments to
  1756. parts of global variables (e.g., list or dictionary items or
  1757. attributes of class instances).  This has not changed; in fact
  1758. assignment to part of a global variable was the standard workaround.
  1759.  
  1760.  
  1761. New exceptions
  1762. --------------
  1763.  
  1764. Several new exceptions have been defined, to distinguish more clearly
  1765. between different types of errors.
  1766.  
  1767. name            meaning                    was
  1768.  
  1769. AttributeError        reference to non-existing attribute    NameError
  1770. IOError            unexpected I/O error            RuntimeError
  1771. ImportError        import of non-existing module or name    NameError
  1772. IndexError        invalid string, tuple or list index    RuntimeError
  1773. KeyError        key not in dictionary            RuntimeError
  1774. OverflowError        numeric overflow            RuntimeError
  1775. SyntaxError        invalid syntax                RuntimeError
  1776. ValueError        invalid argument value            RuntimeError
  1777. ZeroDivisionError    division by zero            RuntimeError
  1778.  
  1779. The string value of each exception is now its name -- this makes it
  1780. easier to experimentally find out which operations raise which
  1781. exceptions; e.g.:
  1782.  
  1783.     >>> KeyboardInterrupt
  1784.     'KeyboardInterrupt'
  1785.     >>>
  1786.  
  1787.  
  1788. New argument passing semantics
  1789. ------------------------------
  1790.  
  1791. Off-line discussions with Steve Majewski and Daniel LaLiberte have
  1792. convinced me that Python's parameter mechanism could be changed in a
  1793. way that made both of them happy (I hope), kept me happy, fixed a
  1794. number of outstanding problems, and, given some backward compatibility
  1795. provisions, would only break a very small amount of existing code --
  1796. probably all mine anyway.  In fact I suspect that most Python users
  1797. will hardly notice the difference.  And yet it has cost me at least
  1798. one sleepless night to decide to make the change...
  1799.  
  1800. Philosophically, the change is quite radical (to me, anyway): a
  1801. function is no longer called with either zero or one argument, which
  1802. is a tuple if there appear to be more arguments.  Every function now
  1803. has an argument list containing 0, 1 or more arguments.  This list is
  1804. always implemented as a tuple, and it is a (run-time) error if a
  1805. function is called with a different number of arguments than expected.
  1806.  
  1807. What's the difference? you may ask.  The answer is, very little unless
  1808. you want to write variadic functions -- functions that may be called
  1809. with a variable number of arguments.  Formerly, you could write a
  1810. function that accepted one or more arguments with little trouble, but
  1811. writing a function that could be called with either 0 or 1 argument
  1812. (or more) was next to impossible.  This is now a piece of cake: you
  1813. can simply declare an argument that receives the entire argument
  1814. tuple, and check its length -- it will be of size 0 if there are no
  1815. arguments.
  1816.  
  1817. Another anomaly of the old system was the way multi-argument methods
  1818. (in classes) had to be declared, e.g.:
  1819.  
  1820.     class Point():
  1821.         def init(self, (x, y, color)): ...
  1822.         def setcolor(self, color): ...
  1823.         dev moveto(self, (x, y)): ...
  1824.         def draw(self): ...
  1825.  
  1826. Using the new scheme there is no need to enclose the method arguments
  1827. in an extra set of parentheses, so the above class could become:
  1828.  
  1829.     class Point:
  1830.         def init(self, x, y, color): ...
  1831.         def setcolor(self, color): ...
  1832.         dev moveto(self, x, y): ...
  1833.         def draw(self): ...
  1834.  
  1835. That is, the equivalence rule between methods and functions has
  1836. changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y)
  1837. while formerly it was equivalent to Point.moveto(p,(x,y)).
  1838.  
  1839. A special backward compatibility rule makes that the old version also
  1840. still works: whenever a function with exactly two arguments (at the top
  1841. level) is called with more than two arguments, the second and further
  1842. arguments are packed into a tuple and passed as the second argument.
  1843. This rule is invoked independently of whether the function is actually a
  1844. method, so there is a slight chance that some erroneous calls of
  1845. functions expecting two arguments with more than that number of
  1846. arguments go undetected at first -- when the function tries to use the
  1847. second argument it may find it is a tuple instead of what was expected.
  1848. Note that this rule will be removed from future versions of the
  1849. language; it is a backward compatibility provision *only*.
  1850.  
  1851. Two other rules and a new built-in function handle conversion between
  1852. tuples and argument lists:
  1853.  
  1854. Rule (a): when a function with more than one argument is called with a
  1855. single argument that is a tuple of the right size, the tuple's items
  1856. are used as arguments.
  1857.  
  1858. Rule (b): when a function with exactly one argument receives no
  1859. arguments or more than one, that one argument will receive a tuple
  1860. containing the arguments (the tuple will be empty if there were no
  1861. arguments).
  1862.  
  1863.  
  1864. A new built-in function, apply(), was added to support functions that
  1865. need to call other functions with a constructed argument list.  The call
  1866.  
  1867.     apply(function, tuple)
  1868.  
  1869. is equivalent to
  1870.  
  1871.     function(tuple[0], tuple[1], ..., tuple[len(tuple)-1])
  1872.  
  1873.  
  1874. While no new argument syntax was added in this phase, it would now be
  1875. quite sensible to add explicit syntax to Python for default argument
  1876. values (as in C++ or Modula-3), or a "rest" argument to receive the
  1877. remaining arguments of a variable-length argument list.
  1878.  
  1879.  
  1880. ========================================================
  1881. ==> Release 0.9.3 (never made available outside CWI) <==
  1882. ========================================================
  1883.  
  1884. - string sys.version shows current version (also printed on interactive entry)
  1885. - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc.
  1886. - 'global' statement to declare module-global variables assigned in functions.
  1887. - new class declaration syntax: class C(Base1, Base2, ...): suite
  1888.   (the old syntax is still accepted -- be sure to convert your classes now!)
  1889. - C shifting and masking operators: << >> ~ & ^ | (for ints and longs).
  1890. - C comparison operators: == != (the old = and <> remain valid).
  1891. - floating point numbers may now start with a period (e.g., .14).
  1892. - definition of integer division tightened (always truncates towards zero).
  1893. - new builtins hex(x), oct(x) return hex/octal string from (long) integer.
  1894. - new list method l.count(x) returns the number of occurrences of x in l.
  1895. - new SGI module: al (Indigo and 4D/35 audio library).
  1896. - the FORMS interface (modules fl and FL) now uses FORMS 2.0
  1897. - module gl: added lrect{read,write}, rectzoom and pixmode;
  1898.   added (non-GL) functions (un)packrect.
  1899. - new socket method: s.allowbroadcast(flag).
  1900. - many objects support __dict__, __methods__ or __members__.
  1901. - dir() lists anything that has __dict__.
  1902. - class attributes are no longer read-only.
  1903. - classes support __bases__, instances support __class__ (and __dict__).
  1904. - divmod() now also works for floats.
  1905. - fixed obscure bug in eval('1            ').
  1906.  
  1907.  
  1908. ===================================
  1909. ==> Release 0.9.2 (Autumn 1991) <==
  1910. ===================================
  1911.  
  1912. Highlights
  1913. ----------
  1914.  
  1915. - tutorial now (almost) complete; library reference reorganized
  1916. - new syntax: continue statement; semicolons; dictionary constructors;
  1917.   restrictions on blank lines in source files removed
  1918. - dramatically improved module load time through precompiled modules
  1919. - arbitrary precision integers: compute 2 to the power 1000 and more...
  1920. - arithmetic operators now accept mixed type operands, e.g., 3.14/4
  1921. - more operations on list: remove, index, reverse; repetition
  1922. - improved/new file operations: readlines, seek, tell, flush, ...
  1923. - process management added to the posix module: fork/exec/wait/kill etc.
  1924. - BSD socket operations (with example servers and clients!)
  1925. - many new STDWIN features (color, fonts, polygons, ...)
  1926. - new SGI modules: font manager and FORMS library interface
  1927.  
  1928.  
  1929. Extended list of changes in 0.9.2
  1930. ---------------------------------
  1931.  
  1932. Here is a summary of the most important user-visible changes in 0.9.2,
  1933. in somewhat arbitrary order.  Changes in later versions are listed in
  1934. the "highlights" section above.
  1935.  
  1936.  
  1937. 1. Changes to the interpreter proper
  1938.  
  1939. - Simple statements can now be separated by semicolons.
  1940.   If you write "if t: s1; s2", both s1 and s2 are executed
  1941.   conditionally.
  1942. - The 'continue' statement was added, with semantics as in C.
  1943. - Dictionary displays are now allowed on input: {key: value, ...}.
  1944. - Blank lines and lines bearing only a comment no longer need to
  1945.   be indented properly.  (A completely empty line still ends a multi-
  1946.   line statement interactively.)
  1947. - Mixed arithmetic is supported, 1 compares equal to 1.0, etc.
  1948. - Option "-c command" to execute statements from the command line
  1949. - Compiled versions of modules are cached in ".pyc" files, giving a
  1950.   dramatic improvement of start-up time
  1951. - Other, smaller speed improvements, e.g., extracting characters from
  1952.   strings, looking up single-character keys, and looking up global
  1953.   variables
  1954. - Interrupting a print operation raises KeyboardInterrupt instead of
  1955.   only cancelling the print operation
  1956. - Fixed various portability problems (it now passes gcc with only
  1957.   warnings -- more Standard C compatibility will be provided in later
  1958.   versions)
  1959. - Source is prepared for porting to MS-DOS
  1960. - Numeric constants are now checked for overflow (this requires
  1961.   standard-conforming strtol() and strtod() functions; a correct
  1962.   strtol() implementation is provided, but the strtod() provided
  1963.   relies on atof() for everything, including error checking
  1964.  
  1965.  
  1966. 2. Changes to the built-in types, functions and modules
  1967.  
  1968. - New module socket: interface to BSD socket primitives
  1969. - New modules pwd and grp: access the UNIX password and group databases
  1970. - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager
  1971. - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library
  1972. - New numeric type: long integer, for unlimited precision
  1973.     - integer constants suffixed with 'L' or 'l' are long integers
  1974.     - new built-in function long(x) converts int or float to long
  1975.     - int() and float() now also convert from long integers
  1976. - New built-in function:
  1977.     - pow(x, y) returns x to the power y
  1978. - New operation and methods for lists:
  1979.     - l*n returns a new list consisting of n concatenated copies of l
  1980.     - l.remove(x) removes the first occurrence of the value x from l
  1981.     - l.index(x) returns the index of the first occurrence of x in l
  1982.     - l.reverse() reverses l in place
  1983. - New operation for tuples:
  1984.     - t*n returns a tuple consisting of n concatenated copies of t
  1985. - Improved file handling:
  1986.     - f.readline() no longer restricts the line length, is faster,
  1987.       and isn't confused by null bytes; same for raw_input()
  1988.     - f.read() without arguments reads the entire (rest of the) file
  1989.     - mixing of print and sys.stdout.write() has different effect
  1990. - New methods for files:
  1991.     - f.readlines() returns a list containing the lines of the file,
  1992.       as read with f.readline()
  1993.     - f.flush(), f.tell(), f.seek() call their stdio counterparts
  1994.     - f.isatty() tests for "tty-ness"
  1995. - New posix functions:
  1996.     - _exit(), exec(), fork(), getpid(), getppid(), kill(), wait()
  1997.     - popen() returns a file object connected to a pipe
  1998.     - utime() replaces utimes() (the latter is not a POSIX name)
  1999. - New stdwin features, including:
  2000.     - font handling
  2001.     - color drawing
  2002.     - scroll bars made optional
  2003.     - polygons
  2004.     - filled and xor shapes
  2005.     - text editing objects now have a 'settext' method
  2006.  
  2007.  
  2008. 3. Changes to the standard library
  2009.  
  2010. - Name change: the functions path.cat and macpath.cat are now called
  2011.   path.join and macpath.join
  2012. - Added new modules: formatter, mutex, persist, sched, mainloop
  2013. - Added some modules and functionality to the "widget set" (which is
  2014.   still under development, so please bear with me):
  2015.     DirList, FormSplit, TextEdit, WindowSched
  2016. - Fixed module testall to work non-interactively
  2017. - Module string:
  2018.     - added functions join() and joinfields()
  2019.     - fixed center() to work correct and make it "transitive"
  2020. - Obsolete modules were removed: util, minmax
  2021. - Some modules were moved to the demo directory
  2022.  
  2023.  
  2024. 4. Changes to the demonstration programs
  2025.  
  2026. - Added new useful scipts: byteyears, eptags, fact, from, lfact,
  2027.   objgraph, pdeps, pi, primes, ptags, which
  2028. - Added a bunch of socket demos
  2029. - Doubled the speed of ptags
  2030. - Added new stdwin demos: microedit, miniedit
  2031. - Added a windowing interface to the Python interpreter: python (most
  2032.   useful on the Mac)
  2033. - Added a browser for Emacs info files: demo/stdwin/ibrowse
  2034.   (yes, I plan to put all STDWIN and Python documentation in texinfo
  2035.   form in the future)
  2036.  
  2037.  
  2038. 5. Other changes to the distribution
  2039.  
  2040. - An Emacs Lisp file "python.el" is provided to facilitate editing
  2041.   Python programs in GNU Emacs (slightly improved since posted to
  2042.   gnu.emacs.sources)
  2043. - Some info on writing an extension in C is provided
  2044. - Some info on building Python on non-UNIX platforms is provided
  2045.  
  2046.  
  2047. =====================================
  2048. ==> Release 0.9.1 (February 1991) <==
  2049. =====================================
  2050.  
  2051. - Micro changes only
  2052. - Added file "patchlevel.h"
  2053.  
  2054.  
  2055. =====================================
  2056. ==> Release 0.9.0 (February 1991) <==
  2057. =====================================
  2058.  
  2059. Original posting to alt.sources.
  2060.